package view.layer
{
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	

	/**
	 * 模拟人物层 
	 * @author leo
	 * 
	 */	
	public class RoleLayer extends BaseLayer
	{
		/**
		 * 层名字 
		 */		
		public static const NAME :String = "PLAYER_LAYER";
		/**
		 * override width
		 */		
		private var _width :Number = 0;
		/**
		 *  override height
		 */		
		private var _height :Number = 0;
		public function RoleLayer()
		{
			super();
		}
		
		override public function set width(value:Number):void
		{
			_width = value;
			
			if(_width > 0 && _height >0)
			{
				this.graphics.beginFill(0,0);
				this.graphics.drawRect(0,0,value,_height);
				this.graphics.endFill();
				this.moveArea = new Rectangle(this.x,this.y,this.width,this.height);
			}
		}
		
		override public function set height(value:Number):void
		{
			_height = value;
			if(_width > 0 && _height >0)
			{
				this.graphics.beginFill(0,0);
				this.graphics.drawRect(0,0,_width,value);
				this.graphics.endFill();
				this.moveArea = new Rectangle(this.x,this.y,this.width,this.height);
			}
		}
	}
}